<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- // 作业：通过数组解构拿出来这个人的信息（要求用俩变量解构完毕），
    ['张三',{uname:'张三',age:18,address:'杭州'},{uname:'李四',age:20,address:'上海'}]
// 通过解构出来的数据第一个名字 找出这个人的全部信息 打印出来 -->

<script>
let obj = ['张三',{uname:'张三',age:18,address:'杭州'},{uname:'李四',age:20,address:'上海'}]

let [a,b] =obj
console.log(b);

const arr = [
    { uname: '孙六', age: 39 },
    { uname: '刘七', age: 21 },
    { uname: '刘七', age: 1 },
    { uname: '张三', age: 59 },
    { uname: '李四', age: 29 },
    { uname: '王二', age: 19 },
]
// 前提克隆一份数据 
// 1，把age中个位数为9的替换成*  { uname: '孙六', age: 2* },
let res= arr.map(x=>{
  if(x.age % 10 ==9){
    parseInt(x.age/10)+'*'
  }
 
})
console.log(res);
</script>
  </body>
</html>
